<?php
	//exemple de fil d'ariane
	$ariane = array(
		array(
			'href' => "index.php",
			'name' => "Home"
		),
		array(
			'href' => "players.php",
			'name' => "Players"
		)
	);
	
	require("include/includes.php");
	
	
	// Valeurs initiales
	$begin = 0;
	if(isset($_GET['begin']) && is_numeric($_GET['begin']))
	{
		$begin=(int)$_GET['begin'];
	}
	$number = 20;
	if(isset($_GET['number']) && is_numeric($_GET['number']))
	{
		$number=(int)$_GET['number'];
	}
	
	// Récupération dans la bdd
	//$players = Player::getAll($begin, $number);
	$players = Player::getAllNames();
	
	// ------------------------------------------------------------------------
		
	$template = $twig->loadTemplate('players.html');
	$template->display(array(
		'pageTitle' => 'Player list',
		'players' => $players
	)); //TODO ne pas afficher les joueurs DESACTIVATED

?>